<!DOCTYPE html>
<html lang="zh-CN">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
	<title>列表</title>
	<meta name="keywords" content="">
	<meta name="description" content="">
	<script src="js/rem.js"></script>
	<script src="js/jquery.min.js" type="text/javascript"></script>
	<link rel="stylesheet" type="text/css" href="css/base.css"/>
	<link rel="stylesheet" type="text/css" href="css/page.css"/>
	<link rel="stylesheet" type="text/css" href="css/all.css"/>
	<link rel="stylesheet" type="text/css" href="css/mui.min.css"/>
	<link rel="stylesheet" type="text/css" href="css/loaders.min.css"/>
	<link rel="stylesheet" type="text/css" href="css/loading.css"/>
	<link rel="stylesheet" type="text/css" href="slick/slick.css"/>
	<script type="text/javascript">
		$(function () {
			var categoryId = decodeURI(location.search.substr(4)).replace(/\'/g, "");
			console.log(decodeURI(location.search.substr(4)));
			findAllProduct(categoryId);
		})

		 function findAllProduct(categoryId) {
		 	var queryByIdUrl = baseUrl+"/zuul-product/products/findProductByCid/" + categoryId ;
		 	$.get(queryByIdUrl, function (result) {
		 		if (result.state == 1000) {
		 			var typelist = result.data;
		 			for (var i = 0; i < typelist.length; i++) {
		 				var content='<div   class="lie clearfloat">';
						content+="<a href='detail.html?id=" + typelist[i].id + "'> ";
		 				content+= '<div class="tu clearfloat fl">';
		 				content+="<img src=' "  + typelist[i].image  + "'/>";
		 				content+= "</div>";
		 				content+= "</a>";
		 				content+= "<div  class=\"right clearfloat fl\">";
		 				content+="<a href='detail.html?id=" + typelist[i].id + "'> ";
		 				content+="<p class='tit'>"+typelist[i].itemType+"</p>";
		 				content+= "</a>";
		 				content+= "<div class=\"xia clearfloat\">";
		 				content+="<a href='detail.html?id=" + typelist[i].id + "'> ";
		 				content+="<p class='tit'>"+typelist[i].price+"</p>";
		 				content+= "</a>";
		 				content +='<p class="fr db">';
		 				content += typelist[i].priority;
		 				content += " </p>";
		 				content+="</div>";
		 				content+="</div>";
		 				content+="</div>";
						console.log(content);
		 				$("#bottom").append(content);
		 			}
		 		} else {
		 			alert(result.message);
		 		}
		 	})
		 }
	</script>
</head>

<body>
<!--header star-->
<header class="mui-bar mui-bar-nav" id="header">
	<a class="btn" href="javascript:history.go(-1)">
		<i class="iconfont icon-fanhui"></i>
	</a>
	<div class="top-sch-box flex-col">
		<div class="centerflex">
			<i class="fdj iconfont icon-sousuo"></i>
			<input type="text" name="" id="" value="" class="sch-txt" placeholder="输入您要搜索的商品"/>
		</div>
	</div>
	<a class="btn" href="#">
		<i class="iconfont icon-gouwuche"></i>
		<span>2</span>
	</a>
</header>

<div class="warp clearfloat">
	<div class="lists clearfloat">
		<div class="top clearfloat">
			<ul>
				<li>默认</li>
				<li>价格<i  class="iconfont icon-xiala"></i></li>
				<li>销量<i class="iconfont icon-xiala"></i></li>
			</ul>
		</div>
		<div  class="bottom clearfloat" id="bottom">

		</div>
	</div>
</div>


<footer class="page-footer fixed-footer" id="footer">
	<ul>
		<li>
			<a href="index.html">
				<i class="iconfont icon-shouye"></i>
				<p>首页</p>
			</a>
		</li>
		<li class="active">
			<a href="cation.html">
				<i class="iconfont icon-icon04"></i>
				<p>分类</p>
			</a>
		</li>
		<li>
			<a href="shopcar.html">
				<i class="iconfont icon-gouwuche"></i>
				<p>购物车</p>
			</a>
		</li>
		<li>
			<a href="login.html">
				<i class="iconfont icon-yonghuming"></i>
				<p>我的</p>
			</a>
		</li>
	</ul>
</footer>
<!--footer end-->
</body>
<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
<script src="js/mui.min.js"></script>
<script src="js/others.js"></script>
<script type="text/javascript" src="js/hmt.js"></script>
<script src="slick/slick.js" type="text/javascript"></script>
<!--插件-->
<link rel="stylesheet" href="css/swiper.min.css">
<script src="js/swiper.jquery.min.js"></script>
</html>
